package com.jxw.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.jxw.domain.StudyRecord;
import com.jxw.launcher.R;
import java.util.ArrayList;
import java.util.List;

/* loaded from: classes.dex */
public class ZuiJinAdapter extends BaseAdapter {
    private Context context;
    private ViewHolder holder = null;
    private List<StudyRecord> mList;

    @Override // android.widget.Adapter
    public long getItemId(int i) {
        return i;
    }

    public ZuiJinAdapter(Context context, List<StudyRecord> list) {
        this.mList = new ArrayList();
        this.context = context;
        this.mList = list;
    }

    @Override // android.widget.Adapter
    public int getCount() {
        return this.mList.size();
    }

    @Override // android.widget.Adapter
    public Object getItem(int i) {
        return this.mList.get(i);
    }

    @Override // android.widget.Adapter
    public View getView(int i, View view, ViewGroup viewGroup) {
        if (view == null) {
            view = LayoutInflater.from(this.context).inflate(R.layout.item_zuijin, (ViewGroup) null);
            this.holder = new ViewHolder();
            this.holder.tv_wrong = (TextView) view.findViewById(R.id.tv_wrong);
            this.holder.tv_study = (TextView) view.findViewById(R.id.tv_study);
            this.holder.tv_time = (TextView) view.findViewById(R.id.tv_time);
            view.setTag(this.holder);
        } else {
            this.holder = (ViewHolder) view.getTag();
        }
        this.holder.tv_wrong.setText(this.mList.get(i).getName());
        TextView textView = this.holder.tv_study;
        textView.setText(this.mList.get(i).getDuration() + "");
        this.holder.tv_time.setText(this.mList.get(i).getExitTime());
        return view;
    }

    /* loaded from: classes.dex */
    public class ViewHolder {
        private TextView tv_study;
        private TextView tv_time;
        private TextView tv_wrong;

        public ViewHolder() {
        }
    }
}
